function convertDate(obj) {
    if (obj == null || obj =='') {
        return "";
    } else {
        date = new Date(obj);
        return date.getFullYear()+"年"+(date.getMonth()+1)+"月"+date.getDate()+"日"
    }
}
    var shareHolderTemp = false;
    var mortTemp = false;
    var punishmentTemp = false;
    var freezeTemp = false;
    var altershareholderTemp = false;
    var shareHolderAltTemp = false;
    var licenceTemp = false;
    function shareHodlerDetail(inv, invId){
        $(".entry").remove();
        var shareHodlerDetailUrl = "/corp-query-entprise-info-shareholderDetail-"+invId+".html";
        if(shareHolderTemp == false){
        $.ajax({
            type:"GET",
            url:shareHodlerDetailUrl,
            dataType:"JSON",
            async: true,
            success : function(data){
                var entType = $('#entType').val();
                if(entType==101 ||entType==1001){
                    $('.detail-title').html('发起人及出资详细信息');
                    $('.shareholders_details #onemortgage_alter_info').html('发起人信息');
                    $('#shareholders_details_inv').prev().html('发起人');
                }else if(entType==3){
                    $('.detail-title').html('主管部门（出资人）详细信息');
                    $('.shareholders_details #onemortgage_alter_info').html('主管部门（出资人）信息');
                    $('#shareholders_details_inv').prev().html('主管部门（出资人）');
                }else if(entType==15){
                    $('.detail-title').html('合作各方详细信息');
                    $('.shareholders_details #onemortgage_alter_info').html('合作方信息');
                    $('#shareholders_details_inv').prev().html('合作方');
                }else if(entType==7){
                    $('.detail-title').html('投资人详细信息');
                    $('.shareholders_details #onemortgage_alter_info').html('投资人信息');
                    $('#shareholders_details_inv').prev().html('投资人');
                }else if(entType==5 ||entType==12){
                    $('.detail-title').html('合伙人详细信息');
                    $('.shareholders_details #onemortgage_alter_info').html('合伙人信息');
                    $('#shareholders_details_inv').prev().html('合伙人');
                }else{

                }
                var num = 0;
                var numTemp = 0;
                var liSubConAm = 0;
                var liAcConAm = 0;
                var temp = 0;
                for(var i=1;i<data.data.length;i++){
                    numTemp = data.data[i].length;
                    if(numTemp<temp){
                        numTemp = temp;
                    }
                    temp = numTemp;
                }

                if(temp > num){
                    num = temp;
                }

                $(".row").attr("rowSpan", num);
                var start = 0;
                var liAcConAm2 = "";
                var liAcConAmCount = "";
                for(var i=0;i<data.data[0].length;i++){
                    liAcConAm = liAcConAm + data.data[0][i].acConAm;
                    liAcConAm2 = liAcConAm.toString();
                    start = liAcConAm2.indexOf(".");
                    liAcConAmCount = liAcConAm2.substring(0,start+7);
                }
                var liSubConAm2 = "";
                var liSubConAmCount = "";
                for(var i=0;i<data.data[1].length;i++){
                    liSubConAm = liSubConAm + data.data[1][i].subConAm;
                     liSubConAm2 = liSubConAm.toString();
                     start = liSubConAm2.indexOf(".");
                     liSubConAmCount = liSubConAm2.substring(0,start+7);
                }
                $("#shareholders_details_inv").html(inv.replace(/&rsquo;/,"'"));
                $("#shareholders_details_liSubConAm").html(liSubConAmCount);
                $("#shareholders_details_liAcConAm").html(liAcConAmCount);
                //认缴
                if(data.data[1].length > 0){
                    $("#shareholders_details_sub").after("");
                    for(var i=0;i<data.data[1].length;i++){
                        if(data.data[1][i].conDate == null){
                            var subConDate = "";
                            var subam = "";
                            var comForm ="";
                        }else{
                            var subConDate = convertDate(data.data[1][i].conDate);
                            var subam = data.data[1][i].subConAm;
                            var comForm = data.data[1][i].conForm_CN;
                        }
                        $("#shareholders_details_sub").after("<tr><td class='entry'>"+comForm+"</td><td class='entry'>"+subam+"</td><td class='entry'>"+subConDate+"</td></tr>");
                    }
                }else{
                    var subConDate = "";
                    var subam = "";
                    var comForm = "";
                }
                //实缴
                if(data.data[0].length > 0){
                    $("#shareholders_details_paid").after("");
                    for(var j=0;j<data.data[0].length;j++){
                        if(data.data[0][j].conDate == null){
                            var conDate = "";
                            var acAm= "";
                            var acComfrom = "";
                        }else{
                            var conDate = convertDate(data.data[0][j].conDate);
                            var acAm = data.data[0][j].acConAm;
                            var acComfrom = data.data[0][j].conForm_CN;
                        }
                        $("#shareholders_details_paid").after("<tr><td class='entry'>"+acComfrom+"</td><td class='entry'>"+acAm+"</td><td class='entry'>"+conDate+"</td></tr>");
                    }
                }else{
                    var conDate = "";
                    var acAm= "";
                    var acComfrom = "";
                }
            }
        })
        }
        document.getElementById("bg").style.display ="block";
        document.getElementById("shareholders_details").style.display ="block";
    }

    function punishmentDetail(caseId){
        if(true){
        $.ajax({
            type:"GET",
            url:punishmentDetailInfoUrl,
            dataType:"JSON",
            async: true,
            success : function(data){
            $("#punish_detail_penDecNo").html("");
            $("#punish_detail_name").html("");
            $("#punish_detail_regNo").html("");
            $("#punish_detail_leRep").html("");
            $('#punish_detail_illegActType').html("");
            $("#punish_detail_penContent").html("");
            $("#punish_detail_penAuth_CN").html("");
            $("#punish_detail_PenDecIssDate").html("");
                for(var i=0;i<data.data.length;i++){
                    if(data.data[i].caseId == caseId && data.data[i].type == "1"){
                        $("#punish_detail_penDecNo").html(data.data[i].penDecNo);
                        var entType = $("#entType").val();
                        if (entType == 16) {
                            $("#punish_detail_name").html(data.data[i].name);
                            $("#punish_detail_regNo").html(data.data[i].gtRegNo);
                        } else {
                            if (data.data[i].uniscId == null || data.data[i].uniscId == "") {
                                $("#punish_detail_regNo").html(data.data[i].regNo);
                            } else {
                                $("#punish_detail_regNo").html(data.data[i].uniscId);
                            }
                            $("#punish_detail_name").html(data.data[i].unitName);
                        }
                        $("#punish_detail_leRep").html(data.data[i].leRep);
                        $('#punish_detail_illegActType').html(data.data[i].illegActType);
                        $("#punish_detail_penContent").html(data.data[i].penContent);
                        $("#punish_detail_penAuth_CN").html(data.data[i].penAuth_CN);
                        var penDecIssDate = convertDate(data.data[i].penDecIssDate);
                        $("#punish_detail_PenDecIssDate").html(penDecIssDate);
                    }
                }
            }
        })
        }

        document.getElementById("bg").style.display ="block";
        document.getElementById("punish_detail").style.display ="block";
    }
    //司法股权冻结信息中的状态为“解除冻结”
    function freezeDetail(parent_Id){
        console.log("/corp-query-entprise-info-judiciaryStockfreeze-" + parent_Id + ".html");
        $.ajax({
            type:"GET",
            url:"/corp-query-entprise-info-judiciaryStockfreeze-" + parent_Id + ".html",
            dataType:"JSON",
            async: true,
            success : function(data){
                document.getElementById("baseDetailCancel").style.display = ""
                document.getElementById("continuation").style.display = ""
                document.getElementById("freezeCancelInfo").style.display = ""
                document.getElementById("invalid").style.display = ""
                document.getElementById("one").style.display = ""
                document.getElementById("two").style.display = ""
                document.getElementById("three").style.display = ""
                document.getElementById("four").style.display = ""
                var z = 0;
                var j = 0;
                var k = 0;
                var g = 0;
                $("#baseDetailCancel [class='temp']").remove();
                $("#continuation [class='temp']").remove();
                $("#freezeCancelInfo [class='temp']").remove();
                $("#invalid [class='temp']").remove();
                for(var i=0;i<data.data.length;i++){
                    for(var s in data.data[i]){
                        if(!$.trim(data.data[i][s])) data.data[i][s] = '';
                    }

                        if(data.data[i].frozState == "1"){
                            if(data.data[i].keepFrozDeadline != "" && data.data[i].keepFrozDeadline > 0){
                                var froFrom = convertDate(data.data[i].keepFroFrom);
                                var froTo = convertDate(data.data[i].keepFroTo);
                                var publicDate = convertDate(data.data[i].publicDate);
                                $("#froAuth").html("").html("<th class='title'>执行法院</th><td class='entry'>"+data.data[i].froAuth+"</td><th class='title'>执行事项</th><td class='entry'>"+data.data[i].executeItem_CN+"</td>");
                                $("#froDocNo").html("").html("<th class='title'>执行裁定书文号</th><td class='entry'>"+data.data[i].froDocNo+"</td><th class='title'>执行通知书文号</th><td class='entry'>"+data.data[i].executeNo+"</td>");
                                if(data.data[i].froAm==null||data.data[i].froAm==''){
                                    $("#inv").html("").html("<th class='title'>被执行人</th><td class='entry'>"+data.data[i].inv+"</td><th class='title'>被执行人持有股权、其它投资权益的数额</th><td class='entry'></td>");
                                }else{
                                    $("#inv").html("").html("<th class='title'>被执行人</th><td class='entry'>"+data.data[i].inv+"</td><th class='title'>被执行人持有股权、其它投资权益的数额</th><td class='entry'>"+data.data[i].froAm+"万"+data.data[i].regCapCur_CN+"</td>");
                                }

                                if(data.data[i].cerType_CN != ""){
                                    $("#cardType").html("").html("<th class='title'>被执行人证照种类</th><td class='entry'>"+data.data[i].cerType_CN+"</td> <th class='title'>被执行人证照号码</th><td class='entry'>"+""+"</td>");
                                }else if(data.data[i].cerType_CN == "" && data.data[i].bLicType_CN != ""){
                                    $("#cardType").html("").html("<th class='title'>被执行人证照种类</th><td class='entry'>"+data.data[i].bLicType_CN+"</td> <th class='title'>被执行人证照号码</th><td class='entry'>"+data.data[i].bLicNo+"</td>");
                                }else{
                                    $("#cardType").html("").html("<th class='title'>被执行人证照种类</th><td class='entry'>"+""+"</td> <th class='title'>被执行人证照号码</th><td class='entry'>"+""+"</td>");
                                }
                                $("#dateFrom").html("").html(" <th class='title'>续行冻结期限自</th><td class='entry'>"+froFrom+"</td><th class='title'>续行冻结期限至</th><td class='entry'>"+froTo+"</td>");
                                $("#publicDate").html("").html(" <th class='title'>续行冻结期限</th><td class='entry'>"+data.data[i].keepFrozDeadline+"</td><th class='title'>公示日期</th><td class='entry'>"+publicDate+"</td>");
                                j++;
                            }
                            else{
                                var froFrom = convertDate(data.data[i].froFrom);
                                var froTo = convertDate(data.data[i].froTo);
                                var publicDate = convertDate(data.data[i].publicDate);
                                $("#froAuthAndThing").html("").html("<th class='title'>执行法院</th><td class='entry'>"+data.data[i].froAuth+"</td><th class='title'>执行事项</th><td class='entry'>"+data.data[i].executeItem_CN+"</td>");
                                $("#NumAndfroDocNo").html("").html("<th class='title'>执行裁定书文号</th><td class='entry'>"+data.data[i].froDocNo+"</td><th class='title'>执行通知书文号</th><td class='entry'>"+data.data[i].executeNo+"</td>");
                                if(data.data[i].froAm==null||data.data[i].froAm==''){
                                    $("#bePerson").html("").html("<th class='title'>被执行人</th><td class='entry'>"+data.data[i].inv+"</td><th class='title'>被执行人持有股权、其它投资权益的数额</th><td class='entry'></td>");
                                }else{
                                    $("#bePerson").html("").html("<th class='title'>被执行人</th><td class='entry'>"+data.data[i].inv+"</td><th class='title'>被执行人持有股权、其它投资权益的数额</th><td class='entry'>"+data.data[i].froAm+"万"+data.data[i].regCapCur_CN+"</td>");
                                }

                                if(data.data[i].cerType_CN != ""){
                                    $("#cardTypeOne").html("").html("<th class='title'>被执行人证照种类</th><td class='entry'>"+data.data[i].cerType_CN+"</td> <th class='title'>被执行人证照号码</th><td class='entry'>"+""+"</td>");
                                }else if(data.data[i].cerType_CN == "" && data.data[i].bLicType_CN != ""){
                                    $("#cardTypeOne").html("").html("<th class='title'>被执行人证照种类</th><td class='entry'>"+data.data[i].bLicType_CN+"</td> <th class='title'>被执行人证照号码</th><td class='entry'>"+data.data[i].bLicNo+"</td>");
                                }else{
                                    $("#cardTypeOne").html("").html("<th class='title'>被执行人证照种类</th><td class='entry'>"+""+"</td> <th class='title'>被执行人证照号码</th><td class='entry'>"+""+"</td>");
                                }
                                $("#congeal").html("").html("<th class='title'>冻结期限自</th><td class='entry'>"+froFrom+"</td> <th class='title'>冻结期限至</th><td class='entry'>"+froTo+"</td>");
                                $("#congealAndDate").html("").html("<th class='title'>冻结期限</th><td class='entry'>"+data.data[i].frozDeadline+"</td><th class='title'>公示日期</th><td class='entry'>"+publicDate+"</td>");
                                z++;
                            }

                        }
                        if(data.data[i].frozState == "2"){
                            var thawDate = convertDate(data.data[i].thawDate);
                            var publicDate = convertDate(data.data[i].publicDate);
                            $("#froAuthThree").html("").html("<th class='title'>执行法院</th><td class='entry'>"+data.data[i].froAuth+"</td><th class='title'>执行事项</th><td class='entry'>"+data.data[i].executeItem_CN+"</td>");
                            $("#cardNumThree").html("").html("<th class='title'>执行裁定书文号</th><td class='entry'>"+data.data[i].froDocNo+"</td><th class='title'>执行通知书文号</th><td class='entry'>"+data.data[i].executeNo+"</td>");
                            if(data.data[i].froAm==null||data.data[i].froAm==''){
                                $("#personThree").html("").html("<th class='title'>被执行人</th><td class='entry'>"+data.data[i].inv+"</td><th class='title'>被执行人持有股权、其它投资权益的数额</th><td class='entry'></td>");
                            }else{
                                $("#personThree").html("").html("<th class='title'>被执行人</th><td class='entry'>"+data.data[i].inv+"</td><th class='title'>被执行人持有股权、其它投资权益的数额</th><td class='entry'>"+data.data[i].froAm+"万"+data.data[i].regCapCur_CN+"</td>");
                            }

                            if(data.data[i].cerType_CN != ""){
                                $("#cardTypeThree").html("").html("<th class='title'>被执行人证照种类</th><td class='entry'>"+data.data[i].cerType_CN+"</td> <th class='title'>被执行人证照号码</th><td class='entry'>"+""+"</td>");
                            }else if(data.data[i].cerType_CN == "" && data.data[i].bLicType_CN != ""){
                                $("#cardTypeThree").html("").html("<th class='title'>被执行人证照种类</th><td class='entry'>"+data.data[i].bLicType_CN+"</td> <th class='title'>被执行人证照号码</th><td class='entry'>"+data.data[i].bLicNo+"</td>");
                            }else{
                                $("#cardTypeThree").html("").html("<th class='title'>被执行人证照种类</th><td class='entry'>"+""+"</td> <th class='title'>被执行人证照号码</th><td class='entry'>"+""+"</td>");
                            }
                            $("#conDateThree").html("").html("<th class='title'>解除冻结日期</th><td class='entry'>"+thawDate+"</td><th class='title'>公示日期</th><td class='entry'>"+publicDate+"</td>");
                            k++;
                        }
                        if(data.data[i].frozState == "3"){
                            var loseEffDate = convertDate(data.data[i].loseEffDate);
                            $("#reson").html("").html("<th class='title'>失效原因</th><td class='entry'>"+data.data[i].loseEffRes_CN+"</td>");
                            $("#time").html("").html("<th class='title'>失效时间</th><td class='entry'>"+loseEffDate+"</td>");
                            g++;
                        }
                    }
                if(z==0){
                    document.getElementById("baseDetailCancel").style.display = "none"
                        document.getElementById("one").style.display = "none"
                }
                if(j==0){
                    document.getElementById("continuation").style.display = "none"
                        document.getElementById("two").style.display = "none"
                }
                if(k==0){
                    document.getElementById("freezeCancelInfo").style.display = "none"
                        document.getElementById("three").style.display = "none"
                }
                if(g==0){
                    document.getElementById("invalid").style.display = "none"
                        document.getElementById("four").style.display = "none"
                }
            }
        })
        document.getElementById("bg").style.display ="block";
        document.getElementById("freeze_detail").style.display ="block";
    }
    //司法股权冻结信息中的状态为“冻结”
    function freezeDetailContinuation(parent_Id){
        if(freezeTemp == false){
        $.ajax({
            type:"GET",
            url:judiciaryStockfreezeDetailUrl,
            dataType:"JSON",
            async: true,
            success : function(data){
                var keepIsNull = true;
                for(var i=0;i<data.data.length;i++){
                    if(data.data[i].parent_Id == parent_Id){
                    if(data.data[i].frozState == "1"  && data.data[i].keepFrozDeadline == ""){
                        var date1 = new Date(data.data[i].froFrom);
                        var froFrom = date1.getFullYear()+'年'+(date1.getMonth()+1)+'月'+date1.getDate()+'日';
                        var date2 = new Date(data.data[i].froTo);
                        var froTo = date2.getFullYear()+'年'+(date2.getMonth()+1)+'月'+date2.getDate()+'日';
                        var date3 = new Date(data.data[i].publicDate);
                        var publicDate = date3.getFullYear()+'年'+(date3.getMonth()+1)+'月'+date3.getDate()+'日';
                        data.data[i].publicDate
                        $("#baseDetail").append("<tr><td class='entry'>"+data.data[i].froAuth+"</td><td class='entry'>"+data.data[i].executeItem_CN+"</td><td class='entry'>"+data.data[i].froDocNo+"</td><td class='entry'>"+data.data[i].executeNo+"</td><td class='entry'>"+data.data[i].inv+"</td><td class='entry'>"+data.data[i].froAm+"</td><td class='entry'>"+data.data[i].cerType_CN+"</td><td class='entry'>"+data.data[i].cerNo+"</td><td class='entry'>"+froFrom+"</td><td class='entry'>"+froTo+"</td><td class='entry'>"+data.data[i].frozDeadline+"</td><td class='entry'>"+publicDate+"</td></tr>");
                    }
                    if(data.data[i].frozState == "1"  && data.data[i].keepFrozDeadline != ""){
                        var date1 = new Date(data.data[i].thawDate);
                        var thawDate = date1.getFullYear()+'年'+(date1.getMonth()+1)+'月'+date1.getDate()+'日';
                        var date2 = new Date(data.data[i].publicDate);
                        var publicDate = date2.getFullYear()+'年'+(date2.getMonth()+1)+'月'+date2.getDate()+'日';
                        $("#continuation").append("<tr><td class='entry'>"+data.data[i].froAuth+"</td><td class='entry'>"+data.data[i].executeItem_CN+"</td><td class='entry'>"+data.data[i].froDocNo+"</td><td class='entry'>"+data.data[i].executeNo+"</td><td class='entry'>"+data.data[i].inv+"</td><td class='entry'>"+data.data[i].froAm+"</td><td class='entry'>"+data.data[i].cerType_CN+"</td><td class='entry'>"+data.data[i].cerNo+"</td><td class='entry'>"+thawDate+"</td><td class='entry'>"+publicDate+"</td></tr>");
                        keepIsNull = false;
                    }
                }
                }
                if(keepIsNull){
                    document.getElementById("continuation").style.display = "none"
                }
            }
        })
        freezeTemp = true;
        }
        $("#freeze_detail_continuation").show();
    }
    //司法股权冻结信息中的状态为“失效”
    function freezeDetailInvalid(parent_Id) {
        $.ajax({
            type: "GET",
            url: judiciaryStockfreezeDetailUrl,
            dataType: "JSON",
            async: true,
            success: function (data) {
                for (var i = 0; i < data.data.length; i++) {
                    if (data.data[i].parent_Id == parent_Id) {
                        if (data.data[i].frozState == "1" && data.data[i].keepFrozDeadline == "") {
                            var date1 = new Date(data.data[i].froFrom);
                            var froFrom = date1.getFullYear() + '年' + (date1.getMonth() + 1) + '月' + date1.getDate() + '日';
                            var date2 = new Date(data.data[i].froTo);
                            var froTo = date2.getFullYear() + '年' + (date2.getMonth() + 1) + '月' + date2.getDate() + '日';
                            var date3 = new Date(data.data[i].publicDate);
                            var publicDate = date3.getFullYear() + '年' + (date3.getMonth() + 1) + '月' + date3.getDate() + '日';
                            data.data[i].publicDate
                            $("#baseDetailInvalid").append("<tr><td class='entry'>" + data.data[i].froAuth + "</td><td class='entry'>" + data.data[i].executeItem_CN + "</td><td class='entry'>" + data.data[i].froDocNo + "</td><td class='entry'>" + data.data[i].executeNo + "</td><td class='entry'>" + data.data[i].inv + "</td><td class='entry'>" + data.data[i].froAm + "</td><td class='entry'>" + data.data[i].cerType_CN + "</td><td class='entry'>" + data.data[i].cerNo + "</td><td class='entry'>" + froFrom + "</td><td class='entry'>" + froTo + "</td><td class='entry'>" + data.data[i].frozDeadline + "</td><td class='entry'>" + publicDate + "</td></tr>");
                        }
                        if (data.data[i].frozState == "3") {
                            var date1 = new Date(data.data[i].loseEffDate);
                            var loseEffDate = date1.getFullYear() + '年' + (date1.getMonth() + 1) + '月' + date1.getDate() + '日';
                            $("#Invalid").append("<tr><td class='entry'>" + data.data[i].loseEffRes_CN + "</td><td class='entry'>" + loseEffDate + "</td></tr>");
                        }
                    }
                }
            }
        })
        $("#freeze_detail_invalid").show();
    }
    function altershareholder(impOrgId){
        $.ajax({
            type:"GET",
            url:stakQualitDetailInfoUrl,
            dataType:"JSON",
            async: true,
            success : function(data){
                for(var i=0;i<data.data.length;i++){
                    if(data.data[i].impOrgId == impOrgId){
                        var altDate = convertDate(data.data[i].altDate);
                        $("#holder_alter_altDate").html(altDate);
                        $("#holder_alter_alt").html(data.data[i].alt);
                    }
                }
            }
        })
        //$("#holder_alter").show();
        document.getElementById("bg").style.display ="block";
        document.getElementById("holder_alter").style.display ="block";
    }

    function altershareholder2(impOrgId){
        $.ajax({
            type:"GET",
            url:stakQualitDetailInfoUrl,
            dataType:"JSON",
            async: true,
            success : function(data){
                for(var i=0;i<data.data.length;i++){
                    if(data.data[i].impOrgId == impOrgId){
                        var canDate = convertDate(data.data[i].canDate);
                        $("#holder_alter_canDate").html(canDate);
                        $("#holder_alter_equPleCanRea").html(data.data[i].equPleCanRea);
                    }
                }
            }
        })

        document.getElementById("bg").style.display ="block";
        document.getElementById("holder_alter2").style.display ="block";
        //$("#holder_alter2").show();
    }
    function altershareholder3(impOrgId){
        $.ajax({
            type:"GET",
            url:stakQualitDetailInfoUrl,
            dataType:"JSON",
            async: true,
            success : function(data){
                for(var i=0;i<data.data.length;i++){
                    if(data.data[i].impOrgId == impOrgId){
                        var cancelDate = convertDate(data.data[i].cancelDate);
                        $("#holder_alter_cancelDate").html(cancelDate);
                        $("#holder_alter_cancelRea").html(data.data[i].cancelRea);
                    }
                }
            }
        })
        //$("#holder_alter3").show();
        document.getElementById("bg").style.display ="block";
        document.getElementById("holder_alter3").style.display ="block";
    }

    function pledgeDetail(index){
      row = pledgeList[index];
      console.log(row);
      if (row.vStakQualitInfoAlt.length > 0) {
            $("#pledge_cancel_div").hide();
            $("#pledge_revoke_div").hide();
            $("#pledge_alt_div").show();
            $("#pledge_alter_table tbody").empty();
            for (var i=0;i<row.vStakQualitInfoAlt.length;i++) {
                var indexTemp = parseInt(i) + 1;
                $("#pledge_alter_table tbody").append("<tr><td>" + indexTemp + "</td><td>" + convertDate(row.vStakQualitInfoAlt[i].altDate) + "</td><td>" + row.vStakQualitInfoAlt[i].alt + "</td></tr>");
            }
      }
      if (row.type == "2") {
          var isCancel = false;
          if (row.cancelDate != null || (row.cancelRea != null && row.cancelRea != '')) {
              $("#pledge_cancel_div").hide();
              $("#pledge_alt_div").hide();
              $("#pledge_revoke_div").show();
              $("#pledge_revoke_date").html(convertDate(row.cancelDate));
              $("#pledge_revoke_rea").html(row.cancelRea);
          }
          if (row.canDate != null || (row.equpleCanRea != null && row.equpleCanRea != '')) {
              $("#pledge_revoke_div").hide();
              $("#pledge_alt_div").hide();
              $("#pledge_cancel_div").show();
              $("#pledge_cancel_date").html(convertDate(row.canDate));
              $("#pledge_cancel_rea").html(row.equPleCanRea);
          }
        } else {
            $("#pledge_cancel_div").hide();
            $("#pledge_revoke_div").hide();
            $("#pledge_alt_div").show();
            $("#pledge_alter_table tbody").empty();
            $("#pledge_alter_table tbody").append("<tr><td colspan='3'>暂无股权出质变更信息</td></tr>");
        }
        document.getElementById("bg").style.display ="block";
        document.getElementById("pledge_alter").style.display ="block";
    }

    function mortRegDetail(morregId,morRegCNo,regiDate,regOrgCN){
            var regiDateF = convertDate(Number(regiDate));
            $("#mortgage_alter_morRegCNO").html(morRegCNo);
            $("#mortgage_alter_regiDate").html(regiDateF);
            $("#mortgage_alter_RegOrg_CN").html(regOrgCN);


        $.ajax({
            type:"GET",
            url:"/corp-query-entprise-info-mortregpersoninfo-"+morregId+".html",
            dataType:"JSON",
            async: false,
            success : function(data){
                var id = null;
                var num = 0;
                if (data.data.length == 0){
                    $("#person").append("<tr class='temp'><td colspan = '5'>暂无抵押劝人信息</td></tr> ");
                }else{
                    for(var i=0;i<data.data.length;i++){
                        if(data.data[i].morReg_Id == morregId){
                            id++;
                            $("#person").append("<tr class='temp'><td class='entry'>"+id+"</td><td class='entry'>"+data.data[i].more+"</td><td class='entry'>"+data.data[i].bLicType_CN+"</td><td class='entry'>"+data.data[i].bLicNo+"</td><td class='entry'>"+""+"</td></tr> ");
                        } else {
                            $("#person").append("<tr class='temp'><td colspan = '5'>暂无抵押劝人信息</td></tr> ");
                        }
                    }
                }
            }
        })

        $.ajax({
            type:"GET",
            url:"corp-query-entprise-info-mortCreditorRightInfo-"+morregId+".html",
            dataType:"JSON",
            async: false,
            success : function(data){
                var num =0;
                if (data.data.length == 0){
                    $("#priClaSec").hide();
                    $("#noPriClaSec").show();
                    $("#noPriClaSec").append("<tr class='temp'><td colspan = '5'>暂无被担保主债权信息</td></tr> ");
                }else{
                    $("#priClaSec").show();
                    $("#noPriClaSec").hide();
                    for(var i=0;i<data.data.length;i++){
                        if(data.data[i].morReg_Id == morregId){
                            var pefPerForm = convertDate(data.data[i].pefPerForm);
                            var pefPerTo = convertDate(data.data[i].pefPerTo);
                            //$("#priClaSec").append("<tr class='temp'><td class='entry'>"+data.data[i].priClaSecKind_CN+"</td><td class='entry'>"+data.data[i].priClaSecAm+"</td><td class='entry'>"+data.data[i].warCov+"</td><td class='entry'>"+pefPerForm+"</td><td class='entry'>"+pefPerTo+"</td><td class='entry'>"+data.data[i].remark+"</td></tr> ")
                            $("#mortgage_alter_priClaSecKind_CN").html("").html(data.data[i].priClaSecKind_CN);
                            $("#mortgage_alter_priClaSecAm").html("").html(data.data[i].priClaSecAm + "万" + data.data[i].regCapCur_CN);
                            $("#mortgage_alter_warCov").html("").html(data.data[i].warCov);
                            $("#mortgage_alter_pefPerForm").html("").html(pefPerForm+"至"+pefPerTo);
                            $("#mortgage_alter_cremark").html("").html(data.data[i].remark)
                        } else {
                        //  $("#priClaSec").append("<tr class='temp'><td colspan = '5'>暂无被担保主债权信息</td></tr> ");
                            $("#mortgage_alter_priClaSecKind_CN").html("").html("暂无被担保主债权信息");
                            $("#mortgage_alter_priClaSecAm").html("").html("暂无被担保主债权信息");
                            $("#mortgage_alter_warCov").html("").html("暂无被担保主债权信息");
                            $("#mortgage_alter_pefPerForm").html("").html("暂无被担保主债权信息");
                            $("#mortgage_alter_pefPerTo").html("").html("暂无被担保主债权信息");
                            $("#mortgage_alter_cremark").html("").html("暂无被担保主债权信息")
                        }
                    }
                }
            }
        })

        $.ajax({
            type:"GET",
            url:"/corp-query-entprise-info-mortGuaranteeInfo-"+morregId+".html",
            dataType:"JSON",
            async: false,
            success : function(data){
                var num =0;
                var mortGuaranteeInfoId = null;
                if (data.data.length == 0){
                    $("#mortGuaranteeInfo").append("<tr class='temp'><td colspan = '5'>暂无抵押物信息</td></tr> ");
                } else {
                    for(var i=0;i<data.data.length;i++){
                        if(data.data[i].morReg_Id == morregId){
                            mortGuaranteeInfoId++;
                            $("#mortGuaranteeInfo").append("<tr class='temp'><td class='entry'>"+mortGuaranteeInfoId+"</td><td class='entry'>"+data.data[i].guaName+"</td><td class='entry'>"+data.data[i].own+"</td><td class='entry'>"+data.data[i].guaDes+"</td><td class='entry'>"+data.data[i].remark+"</td></tr> ");
                        } else {
                            $("#mortGuaranteeInfo").append("<tr class='temp'><td colspan = '5'>暂无抵押物信息</td></tr> ");
                        }
                    }
                }
            }
        })

        $.ajax({
            type:"GET",
            url:"/corp-query-entprise-info-getMortAltItemInfo-"+morregId+".html",
            dataType:"JSON",
            async: false,
            success : function(data){
                var num =0;
                var mortAltItemInfoId = null;
                if (data.data.length == 0){
                    $("#alt").append("<tr class='temp'><td colspan = '5'>暂无变更信息</td></tr> ");
                } else {
                    for(var i=0;i<data.data.length;i++){
                        if(data.data[i].morReg_Id == morregId){
                            mortAltItemInfoId++;
                            if(data.data[i].altDate == null){
                                var altDate = "";
                            }else{
                                var altDate = convertDate(data.data[i].altDate);
                            }
                            $("#alt").append("<tr class='temp'><td class='entry'>"+mortAltItemInfoId+"</td><td class='entry'>"+altDate+"</td><td class='entry'>"+data.data[i].alt+"</td></tr> ");
                        } else {
                            $("#alt").append("<tr class='temp'><td colspan = '5'>暂无变更信息</td></tr> ");
                        }
                    }
                }
            }
        })

        $.ajax({
            type:"GET",
            url:"/corp-query-entprise-info-getMortRegCancelInfo-"+morregId+".html",
            dataType:"JSON",
            async: false,
            success : function(data){
                var num =0;
                if (data.data.length == 0){
                    $("#cancel").hide();
                    $("#cancel2").show();
                    $("#cancel2").append("<tr class='temp'><td colspan = '5'>暂无注销信息</td></tr> ");
                } else {
                    $("#cancel2").hide();
                    $("#cancel").show();
                    for(var i=0;i<data.data.length;i++){
                        if(data.data[i].morReg_Id == morregId){
                            var canDate = convertDate(data.data[i].canDate);
                        //  $("#cancel").append("<tr class='temp'><td class='entry'>"+canDate+"</td><td class='entry'>"+data.data[i].morCanRea_CN+"</td></tr> ");
                            $("#mortgage_alter_canDate").html("").html(canDate);
                            $("#mortgage_alter_morCanRea_CN").html("").html(data.data[i].morCanRea_CN);
                        } else {
                        //  $("#cancel").append("<tr class='temp'><td colspan = '5'>暂无注销信息</td></tr> ");
                            $("#mortgage_alter_canDate").html("").html("暂无注销信息");
                            $("#mortgage_alter_morCanRea_CN").html("").html("暂无注销信息");
                        }
                    }
                }
            }
        })
        //}
        //$("#mortgage_alter").show();
        document.getElementById("bg").style.display ="block";
        document.getElementById("mortgage_alter").style.display ="block";
    }


    function mortRegDetail2(morregId,morRegCNo,regiDate,regOrgCN){
        //if(mortTemp != morregId){
            //mortTemp = morregId;

            var regiDateF = convertDate(Number(regiDate));
            $("#mortgage_alter_morRegCNO2").html(morRegCNo);
            $("#mortgage_alter_regiDate2").html(regiDateF);
            $("#mortgage_alter_RegOrg_CN2").html(regOrgCN);


        $.ajax({
            type:"GET",
            url:"/corp-query-entprise-info-mortregpersoninfo-"+morregId+".html",
            dataType:"JSON",
            async: false,
            success : function(data){
                var id = null;
                var num = 0;
                if (data.data.length == 0){
                    $("#person2").append("<tr class='temp'><td colspan = '5'>暂无抵押权人信息</td></tr> ");
                }else{
                    for(var i=0;i<data.data.length;i++){
                        if(data.data[i].morReg_Id == morregId){
                            id++;
                            $('.temp').remove();
                            $("#person2").append("<tr class='temp'><td class='entry'>"+id+"</td><td class='entry'>"+data.data[i].more+"</td><td class='entry'>"+data.data[i].bLicType_CN+"</td><td class='entry'>"+data.data[i].bLicNo+"</td><td class='entry'>"+""+"</td></tr> ");
                        } else {
                            $("#person2").append("<tr class='temp'><td colspan = '5'>暂无抵押权人信息</td></tr> ");
                            personTemp2 = 1;
                        }
                    }
                }
            }
        })

        $.ajax({
            type:"GET",
            url:"corp-query-entprise-info-mortCreditorRightInfo-"+morregId+".html",
            dataType:"JSON",
            async: false,
            success : function(data){
                var num =0;
                if (data.data.length == 0){
                    $("#priClaSec2").html('');
                    $("#priClaSec2").append("<tr class='temp'><td colspan = '5'>暂无被担保主债权信息</td></tr> ");
                }else{
                    for(var i=0;i<data.data.length;i++){
                        if(data.data[i].morReg_Id == morregId){
                            var pefPerForm = convertDate(data.data[i].pefPerForm);
                            var pefPerTo = convertDate(data.data[i].pefPerTo);
                        //  $("#priClaSec2").append("<tr class='temp'><td class='entry'>"+data.data[i].priClaSecKind_CN+"</td><td class='entry'>"+data.data[i].priClaSecAm+"</td><td class='entry'>"+data.data[i].warCov+"</td><td class='entry'>"+pefPerForm+"</td><td class='entry'>"+pefPerTo+"</td></tr> ")
                            $("#mortgage_alter_priClaSecKind_CN2").html("").html(data.data[i].priClaSecKind_CN);
                            $("#mortgage_alter_priClaSecAm2").html("").html(data.data[i].priClaSecAm);
                            $("#mortgage_alter_warCov2").html("").html(data.data[i].warCov);
                            $("#mortgage_alter_pefPerForm2").html("").html(pefPerForm+"至"+pefPerTo);
                            $("#mortgage_alter_pefPerTo2").html("").html(data.data.remark);
                        }else{
                        //  $("#priClaSec2").append("<tr class='temp'><td colspan = '5'>暂无被担保主债权信息</td></tr> ");
                            $("#mortgage_alter_priClaSecKind_CN2").html("").html("暂无被担保主债权信息");
                            $("#mortgage_alter_priClaSecAm2").html("").html("暂无被担保主债权信息");
                            $("#mortgage_alter_warCov2").html("").html("暂无被担保主债权信息");
                            $("#mortgage_alter_pefPerForm2").html("").html("暂无被担保主债权信息");
                            $("#mortgage_alter_pefPerTo2").html("").html("暂无被担保主债权信息");
                        }
                    }
                }
            }
        })

        $.ajax({
            type:"GET",
            url:"/corp-query-entprise-info-mortGuaranteeInfo-"+morregId+".html",
            dataType:"JSON",
            async: false,
            success : function(data){
                var num =0;
                var mortGuaranteeInfoId = null;
                if (data.data.length == 0){
                    $("#mortGuaranteeInfo2").append("<tr class='temp'><td colspan = '5'>暂无抵押物信息</td></tr> ");
                }else{
                    for(var i=0;i<data.data.length;i++){
                        if(data.data[i].morReg_Id == morregId){
                            mortGuaranteeInfoId++;
                            $("#mortGuaranteeInfo2").append("<tr class='temp'><td class='entry'>"+mortGuaranteeInfoId+"</td><td class='entry'>"+data.data[i].guaName+"</td><td class='entry'>"+data.data[i].own+"</td><td class='entry'>"+data.data[i].guaDes+"</td><td class='entry'>"+data.data[i].remark+"</td></tr> ");
                        } else {
                            $("#mortGuaranteeInfo2").append("<tr class='temp'><td colspan = '5'>暂无抵押物信息</td></tr> ");
                        }
                    }
                }
            }
        })

        $.ajax({
            type:"GET",
            url:"/corp-query-entprise-info-getMortAltItemInfo-"+morregId+".html",
            dataType:"JSON",
            async: false,
            success : function(data){
                var num =0;
                var mortAltItemInfoId = null;
                if (data.data.length == 0){
                    $("#alt2").append("<tr class='temp'><td colspan = '3'>暂无变更信息</td></tr> ");
                }else{
                    for(var i=0;i<data.data.length;i++){
                        if(data.data[i].morReg_Id == morregId){
                            mortAltItemInfoId++;
                            if(data.data[i].altDate == null){
                                var altDate = "";
                            }else{
                                var altDate = convertDate(data.data[i].altDate);
                            }
                            $("#alt2").append("<tr class='temp'><td class='entry'>"+mortAltItemInfoId+"</td><td class='entry'>"+altDate+"</td><td class='entry'>"+data.data[i].alt+"</td></tr> ");
                        }else{
                            $("#alt2").append("<tr class='temp'><td colspan = '3'>暂无变更信息</td></tr> ");
                        }
                    }
                }
            }
        })

        $.ajax({
            type:"GET",
            url:"/corp-query-entprise-info-getMortRegCancelInfo-"+morregId+".html",
            dataType:"JSON",
            async: false,
            success : function(data){
                var num =0;
                if (data.data.length == 0){
                    $("#cancel2").append("<tr class='temp'><td colspan = '5'>暂无注销信息</td></tr> ");
            } else {
                for(var i=0;i<data.data.length;i++){
                    if(data.data[i].morReg_Id == morregId){
                        var canDate = convertDate(data.data[i].canDate);
                        $("#cancel2").append("<tr class='temp'><td class='entry'>"+canDate+"</td><td class='entry'>"+data.data[i].morCanRea_CN+"</td></tr> ");
                    }
                }
            }
        }
        })
        //$("#mortgage_alter2").show();
        document.getElementById("bg").style.display ="block";
        document.getElementById("mortgage_alter2").style.display ="block";
    }

    function shareHolderAltDetail(altId){
        if(shareHolderAltTemp == false){
        $.ajax({
            type:"GET",
            url:judiciaryAltershareholderUrl,
            dataType:"JSON",
            async: true,
            success : function(data){
                console.log('shareHolderAltDetail');
                console.log(data);
                for(var i=0;i<data.data.length;i++){
                    if(data.data[i].altId == altId){

                        var executeDate = convertDate(data.data[i].executeDate);
                        $("#copyright_alter_froAuth").html(data.data[i].froAuth);
                        $("#copyright_alter_froDocNo").html(data.data[i].froDocNo);
                        $("#copyright_alter_executeNo").html(data.data[i].executeNo);
                        $("#copyright_alter_invType_CN").html(data.data[i].invType_CN);
                        $('#copyright_alter_inv').html(data.data[i].inv);
                        if(data.data[i].invCerType_CN != ""){
                            $("#copyright_alter_invCerType_CN").html(data.data[i].invCerType_CN);
                            //$("#copyright_alter_invCerNo").html(data.data[i].invCerNo);
                        }else if(data.data[i].invCerType_CN == "" && data.data[i].invBLicType_CN != ""){
                            $("#copyright_alter_invCerType_CN").html(data.data[i].invBLicType_CN);
                            $("#copyright_alter_invCerNo").html(data.data[i].invBLicNo);
                        }else{
                            $("#copyright_alter_invCerType_CN").html("");
                            $("#copyright_alter_invCerNo").html("");
                        }
                        $("#copyright_alter_froAm").html(data.data[i].froAm+"万"+data.data[i].regCapCur_CN);
                        //$("#copyright_alter_regCapCur_CN").html(data.data[i].regCapCur_CN);
                        //$("#copyright_alter_alienType_CN").html(data.data[i].alienType_CN);
                        $("#copyright_alter_Alien").html(data.data[i].alien);
                        if(data.data[i].alienCerType_CN != ""){
                            $("#copyright_alter_AlienCerType_CN").html(data.data[i].alienCerType_CN);
                            $("#copyright_alter_alienCerNo").html(data.data[i].alienCerNo);
                        }else if(data.data[i].alienCerType_CN == "" && data.data[i].alienBLicType_CN != ""){
                            $("#copyright_alter_AlienCerType_CN").html(data.data[i].alienBLicType_CN);
                            $("#copyright_alter_alienCerNo").html(data.data[i].alienBLicNo);
                        }else{
                            $("#copyright_alter_AlienCerType_CN").html("");
                            $("#copyright_alter_alienCerNo").html("");
                        }
                        $("#copyright_alter_executeDate").html(executeDate);
                        $("#copyright_alter_thing").html("强制转让被执行人股权，办理有限责任公司股东变更登记");
                    }
                }
            }
        })
        shareHolderAltTemp = true;
        }
        //$(".copyright_alter").show();
        document.getElementById("bg").style.display ="block";
        document.getElementById("copyright_alter").style.display ="block";
    }

    function licenceDetail(licId){
        if(licenceTemp == false){
        $.ajax({
            type:"GET",
            url:otherLicenceDetailInfoUrl,
            dataType:"JSON",
            async: true,
            success : function(data){
                for(var i=0;i<data.data.length;i++){
                    if(data.data[i].licId == licId){
                        var altDate = convertDate(data.data[i].altDate);
                        $("#licence_alter_alt").html(data.data[i].alt);
                        $("#licence_alter_altDate").html(altDate);
                        $("#licence_alter_altBe").html(data.data[i].altBe);
                        $("#licence_alter_altAf").html(data.data[i].altAf);
                    }
                }
            }
        })
    }
        //$("#licence_alter").show();
        document.getElementById("bg").style.display ="block";
        document.getElementById("licence_alter").style.display ="block";
    }

    function licenceDetailInvalidation(licId){
        if(licenceTemp == false){
        $.ajax({
            type:"GET",
            url:otherLicenceDetailInfoUrl,
            dataType:"JSON",
            async: true,
            success : function(data){
                for(var i=0;i<data.data.length;i++){
                    if(data.data[i].licId == licId){
                        var invalidDate = convertDate(data.data[i].invalidDate);
                        $("#licence_alter_invalidDate").html(invalidDate);
                        $("#licence_alter_invalidRea").html(data.data[i].invalidRea);
                    }
                }
            }
        })
    }
        //$("#licence_alter_invalidation").show();
        document.getElementById("bg").style.display ="block";
        document.getElementById("licence_alter_invalidation").style.display ="block";
    }
    var insLicenceDetailInfoUrl = null;
    //企业即时信息的详情
    //行政许可信息
    function insLicenceDetail(status,licId,canDate,equPleCanRea,revDate,sugRevReason,invalidDate,invalidRea){
        //往后台传数据的

        $.ajax({
            type:"GET",
            url:insLicenceInfoForJsUrl+licId+".html",
            dataType:"JSON",
            async: false,
            success : function(data){
                var json =  eval(data);
                insLicenceDetailInfoUrl = json.insLicenceDetailInfoUrl;
                $.ajax({
                    type:"GET",
                    url:insLicenceDetailInfoUrl,
                    dataType:"JSON",
                    async: false,
                    success : function(data){
                            if(status == 1){
                                //控制页面显示与隐藏
                                $("table#ins_detail").show();
                                $("table#ins_detail_invalidLogout").hide();
                                $("table#ins_detail_invalidRevocation").hide();
                                $("table#ins_detail_invalidOtherRes").hide();
                                $("div#alert_Info1").show();
                                $("div#conDate1").hide();
                                $("div#offDate1").hide();
                                $("div#noUseDate1").hide();
                                var str ="" +
                                        "<tr><th class='title'>变更事项</th><th class='title'>变更前内容" +
                                        "</th><th class='title'>变更后内容</th><th class='title'>变更日期</th></tr>";
                                for(var i =0;i<data.list.length;i++){
                                    var javascriptDate = convertDate(data.list[i].altDate);
                                    str =str + "<tr><td>"+data.list[i].alt+"</td>"+"<td>"+data.list[i].altBe+"</td>"+
                                    "<td>"+data.list[i].altAf+"</td>"+"<td>"+javascriptDate+"</td></tr>";
                                }
                                $("#ins_detail").html(str);
                            }
                            else{
                                //注销原因
                                if(status == 2){
                                    $("table#ins_detail").hide();
                                    $("table#ins_detail_invalidLogout").show();
                                    $("table#ins_detail_invalidRevocation").hide();
                                    $("table#ins_detail_invalidOtherRes").hide();
                                    $("div#alert_Info1").hide();
                                    $("div#conDate1").show();
                                    $("div#offDate1").hide();
                                    $("div#noUseDate1").hide();
                                    if(canDate == "null"){
                                        $("div#conDate1").css('opacity', 0);
                                        $("table#ins_detail_invalidLogout").html("<p class='txtStyle'>暂无无效信息</p>");
                                    }else{
                                        var mydate = parseInt(canDate);
                                        var javascriptDate = convertDate(mydate);
                                        $("#ins_licence_detail_EquDate").html("").html(javascriptDate);
                                        $("#ins_licence_detail_EquRes").html("").html(equPleCanRea);
                                    }
                                }
                                //吊销原因
                                else if(status == 3){
                                    $("table#ins_detail").hide();
                                    $("table#ins_detail_invalidLogout").hide();
                                    $("table#ins_detail_invalidRevocation").show();
                                    $("table#ins_detail_invalidOtherRes").hide();
                                    $("div#alert_Info1").hide();
                                    $("div#conDate1").hide();
                                    $("div#offDate1").show();
                                    $("div#noUseDate1").hide();
                                    if(revDate == "null"){
                                        $("div#conDate1").css('opacity', 0);
                                        $("table#ins_detail_invalidRevocation").html("<p class='txtStyle'>暂无无效信息</p>");
                                        // $("#ins_licence_detail_SugDate").html("").html("");
                                        // $("#ins_licence_detail_SugRes").html("").html(sugRevReason);
                                    }else{
                                        var mydate = parseInt(revDate);
                                        var javascriptDate = convertDate(mydate);
                                        $("#ins_licence_detail_SugDate").html("").html(javascriptDate);
                                        $("#ins_licence_detail_SugRes").html("").html(sugRevReason);
                                    }
                                }
                                //其他原因
                                else{
                                    $("table#ins_detail").hide();
                                    $("table#ins_detail_invalidLogout").hide();
                                    $("table#ins_detail_invalidRevocation").hide();
                                    $("table#ins_detail_invalidOtherRes").show();
                                    $("div#alert_Info1").hide();
                                    $("div#conDate1").hide();
                                    $("div#offDate1").hide();
                                    $("div#noUseDate1").show();
                                    if(invalidDate == "null"){
                                        $("div#conDate1").css('opacity', 0);
                                        $("table#ins_detail_invalidOtherRes").html("<p class='txtStyle'>暂无无效信息</p>");
                                        // $("#ins_licence_detail_InvDate").html("").html("");
                                        // $("#ins_licence_detail_InvRes").html("").html(invalidRea);
                                    }else{
                                        var mydate = parseInt(invalidDate);
                                        var javascriptDate = convertDate(mydate);
                                        $("#ins_licence_detail_InvDate").html("").html(javascriptDate);
                                        $("#ins_licence_detail_InvRes").html("").html(invalidRea);
                                    }
                                }

                            }
                    }
                })
            }
        })
        //$(".ins_licence_detail").show();
        document.getElementById("bg").style.display ="block";
        document.getElementById("ins_licence_detail").style.display ="block";
    }
    var insImKlpDetailInfoUrl = null;
    //知识产权出质信息
    function insIntellectualDetail(pleId,type,canDate,equPleCanRea,invalidDate,invalidRea){
        //往后台传数据的
        $.ajax({
            type:"GET",
            url:insImKlpInfoForJsUrl+pleId+".html",
            dataType:"JSON",
            async: false,
            success : function(data){
                var json =  eval(data);
                insImKlpDetailInfoUrl = json.insImKlpDetailInfoUrl;
                $.ajax({
                    type:"GET",
                    url:insImKlpDetailInfoUrl,
                    dataType:"JSON",
                    async: false,
                    success : function(data){
                            if(type == 1){
                                //控制页面显示与隐藏
                                $("table#ins_ImKlp_detailInfo").show();
                                $("table#ins_ImKlp_detailInfoLayout").hide();
                                $("table#ins_ImKlp_detailInfoOther").hide();
                                $("div#knowlage1").show();
                                $("div#knowlageConDate1").hide();
                                $("div#knowlageNoUse1").hide();
                                var str ="<tr><th class='title'>序号</th><th class='title'>变更事项</th><th class='title'>变更时间</th>" +
                                        "<th class='title'>变更前内容</th><th class='title'>变更后内容</th></tr>";

                                for(var i =0;i<data.list.length;i++){
                                    var javascriptDate = convertDate(data.list[i].altDate);
                                    str =str +"<tr><td>"+(i+1)+"</td><td>"+data.list[i].alt+"</td><td>"+javascriptDate+""+"</td><td>"+data.list[i].altBe+"</td><td>"+data.list[i].altAf +
                                    "</td></tr>";
                                }
                                $("#ins_ImKlp_detailInfo").html(str);
                            }
                            else{
                                //注销原因
                                if(type == 2){
                                    $("table#ins_ImKlp_detailInfo").hide();
                                    $("table#ins_ImKlp_detailInfoLayout").show();
                                    $("table#ins_ImKlp_detailInfoOther").hide();
                                    $("div#knowlage1").hide();
                                    $("div#knowlageConDate1").show();
                                    $("div#knowlageNoUse1").hide();
                                    var mydate = parseInt(canDate);
                                    if(canDate == "null"){
                                        $("#ins_ImKlp_detail_EquDate").html("").html("");
                                        $("#ins_ImKlp_detail_EquRes").html("").html(equPleCanRea);
                                    }else{
                                        var javascriptDate = convertDate(mydate);
                                        $("#ins_ImKlp_detail_EquDate").html("").html(javascriptDate);
                                        $("#ins_ImKlp_detail_EquRes").html("").html(equPleCanRea);
                                    }
                                }
                                //其他原因
                                else{
                                    $("table#ins_ImKlp_detailInfo").hide();
                                    $("table#ins_ImKlp_detailInfoLayout").hide();
                                    $("table#ins_ImKlp_detailInfoOther").show();
                                    $("div#knowlage1").hide();
                                    $("div#knowlageConDate1").hide();
                                    $("div#knowlageNoUse1").show();
                                    var mydate = parseInt(invalidDate);
                                    if(invalidDate == "null"){
                                        $("#ins_ImKlp_detail_InvDate").html("").html("");
                                        $("#ins_ImKlp_detail_InvRes").html("").html(invalidRea);
                                    }else{
                                        var javascriptDate = convertDate(mydate);
                                        $("#ins_ImKlp_detail_InvDate").html("").html(javascriptDate);
                                        $("#ins_ImKlp_detail_InvRes").html("").html(invalidRea);
                                    }
                                }

                            }
                    }
                })
            }
        })
        //$(".ins_intellectual_detail").show();
        document.getElementById("bg").style.display ="block";
        document.getElementById("ins_intellectual_detail").style.display ="block";
    }
    var insPunshmentDetailInfoUrl = null;
    //行政处罚信息
    function insSanctionDetail(caseId){
        $.ajax({
            type:"GET",
            url:insPunshmentInfoForJsUrl+caseId+".html",
            dataType:"JSON",
            async: false,
            success : function(data){
                var json =  eval(data);
                insPunshmentDetailInfoUrl = json.insPunshmentDetailInfoUrl;

                $.ajax({
                    type:"GET",
                    url:insPunshmentDetailInfoUrl,
                    dataType:"JSON",
                    async: false,
                    success : function(data){
                            if(data.list.length == 0 ){
                                //控制页面显示与隐藏
                                $("table#ins_sanction_detailInfo").show();
                                var str ="<tr><th class='title'>变更日期</th>" +
                                                        "<th class='title'>作出变更决定机关名称</th>" +
                                                                "<th class='title'>变更内容</th>" +
                                                                        "<th class='title'>备注</th></tr>"+"<tr><td class='title textcenter' colspan='4'>无信息</td></tr>";
                                $("#ins_sanction_detailInfo").html(str);
                            }else{

                                $("table#ins_sanction_detailInfo").show();
                                var str ="<tr><th class='title'>变更日期</th>" +
                                                        "<th class='title'>作出变更决定机关名称</th>" +
                                                                "<th class='title'>变更内容</th>" +
                                                                        "<th class='title'>备注</th></tr>";
                                for(var i =0;i<data.list.length;i++){
                                    var javascriptDate = null;
                                    if(data.list[i].altDate == null){
                                        javascriptDate = "";
                                    }else{
                                        var javascriptDate = convertDate(data.list[i].altDate);
                                    }
                                    str = str +"<tr><td>"+javascriptDate+"</td><td>"+data.list[i].penAuth+"</td><td>"+data.list[i].alt+"</td><td>"+data.list[i].remark+"</td></tr>"
                                }
                                $("#ins_sanction_detailInfo").html(str);
                            }
                    }
                })
            }
        })
        document.getElementById("bg").style.display ="block";
        document.getElementById("ins_sanction_detail").style.display ="block";
    }







    function closeTheWindow(){
        document.getElementById("freeze_detail").style.display = "none";
        $(".temp").empty();
    }
